<template>
	<view class="page">
		<view class="inner-list">
			<t-index-address @select="select"></t-index-address>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				
			}
		},
		onLoad() {},
		methods: {
			select(e){
				let location = {
					city: e.name,
					province: e.province,
					latitude: e.lat,
					longitude: e.lng,
					city:e.name
				}
				this.$store.commit('changeUserLocation', location)
				let pages = getCurrentPages();
				let prevPage = pages[pages.length - 2];
				// #ifdef APP
					if(prevPage.$vm.otherFn){
						prevPage.$vm.otherFn()
					}
				// #endif
				// #ifndef APP
					prevPage.city = e.name
					prevPage.addresInfo = e
				// #endif
				uni.navigateBack()
			},
			back(){
				uni.navigateBack()
			}
		}
	}
</script>

<style lang="scss" scoped>
	.page {
		// padding-top: var(--status-bar-height);
	}
	.inner-list{
		padding: 0 30rpx;
	}
</style>